package com.lujianfei.netease_android_canvas

import android.content.Intent
import android.os.Bundle
import android.view.View
import androidx.appcompat.app.AppCompatActivity
import com.lujianfei.netease_android_canvas.ui.BezierAnimActivity
import com.lujianfei.netease_android_canvas.ui.BezierAnimExplainActivity
import com.lujianfei.netease_android_canvas.ui.MastAnimActivity


class MainActivity : AppCompatActivity(),View.OnClickListener {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        findViewById<View>(R.id.bt_mask_anim).setOnClickListener(this)
        findViewById<View>(R.id.bt_bezier).setOnClickListener(this)
        findViewById<View>(R.id.bt_bezier_explain).setOnClickListener(this)
    }

    override fun onClick(p0: View?) {
        when(p0?.id) {
            R.id.bt_mask_anim->{
                startActivity(Intent(this,MastAnimActivity::class.java))
            }
            R.id.bt_bezier->{
                startActivity(Intent(this,BezierAnimActivity::class.java))
            }
            R.id.bt_bezier_explain->{
                startActivity(Intent(this,BezierAnimExplainActivity::class.java))
            }
        }
    }
}
